/*
 * @Author: 姚潘涛
 * @Date: 2024-06-03 10:41:09
 * @LastEditors: 姚潘涛
 * @LastEditTime: 2024-10-10 17:25:00
 * @Description:
 *
 * Copyright (c) 2024 by pandaman, All Rights Reserved.
 */
#include "xict_common/utils/time.h"
#include <chrono>

namespace xict_common {
    namespace utils {
        int64_t GetCurrentUnixTimestampInSeconds() {
            return std::chrono::duration_cast<std::chrono::seconds>(
                       std::chrono::system_clock::now().time_since_epoch())
                .count();
        }

        uint64_t GetCurrentUnixTimestampInMilliseconds() {
            return std::chrono::duration_cast<std::chrono::milliseconds>(
                       std::chrono::system_clock::now().time_since_epoch())
                .count();
        }
    }   // namespace utils
}   // namespace xict_common